@use "../variables";
@use "../mixins";

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: rgba(3, 16, 27, 0.7);
  transform: scale(1.2);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  -ms-overflow-style: none;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }

  &__wrapper {
    position: relative;
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100%;
    padding: 146px 40px 60px;

    @include mixins.vp-767 {
      padding: 10px 0;
    }
  }

  &__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

  &__content {
    position: relative;
    width: 500px;
    padding: 37px 40px 44px;
    background-color: variables.$color-sky-blue;
    border-radius: 3px;

    @include mixins.vp-767 {
      width: 100%;
      padding: 20px;
    }
  }

  &__close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: variables.$color-transparent;
    border: none;
    color: variables.$color-default-white;
    cursor: pointer;

    &:hover {
      opacity: 0.7;
    }

    &:active {
      opacity: 0.3;
    }

    &:focus-visible {
      opacity: 0.7;
      outline: variables.$color-pearl auto 1px;
    }
  }

  &--responsive {
    .modal__content {
      width: 100%;
    }
  }

  &--fit-content {
    .modal__content {
      width: auto;

      @include mixins.vp-767 {
        width: 100%;
      }
    }
  }

  &--no-scale {
    transform: none;
  }

  &--preload {
    transition: none;
  }

  &.is-active {
    transform: scale(1);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}

.modal h2 {
  margin: 0 0 4px;
  font-family: variables.$ff-roboto-condensed;
  font-weight: 400;
  font-size: 30px;
  line-height: 42.19px;
  color: variables.$color-default-white;
}

.modal p {
  margin: 0 0 39px;
  padding-right: 25px;
  font-family: variables.$ff-pt-mono;
  font-weight: 400;
  font-size: 16px;
  line-height: 21.5px;
  color: variables.$color-default-white;
}

.modal__form-container {
  display: flex;
  flex-direction: column;
  row-gap: 20px;
}

.modal__form-textarea {
  margin-bottom: 2px;
}

.modal__agreement {
  padding: 0 10px;
  font-family: variables.$ff-pt-mono;
  font-size: 14px;
  line-height: 15.58px;
  color: variables.$color-default-white;

  span::before {
    top: 0;
  }
}

.modal__btn {
  max-width: unset;
  width: 100%;
}
